
<div class="right-plate animate-time" [ngClass]="{ 'periodicalFull': opensearch , 'periodicalOff': !opensearch}" id="synonymTable">

  <!-- [paginator]="true" [rows]="5" -->
  <div class="table-thead">
        <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
            <ng-template pTemplate="header">
                <tr class="tableStyle_thead_tr">
                    <th class="bs-checkbox w5 text-center">
                        <input type="checkbox" #event (click)="_selectAll(event.checked,files)" [checked]="isSelectAll">
                    </th>
                    <th class="w5 text-left max-w">ID</th>
                    <th class="w15 text-left max-w">主题词</th>
                    <th class="w5 text-left max-w">标签</th>
                    <th class="w10 text-left max-w">主题码</th>
                    <th class="w5 text-left max-w">状态</th>
                    <th class="w5 text-left max-w">审核状态</th>
                    <th class="w10 text-left max-w">创建时间</th>
                    <th class="w20 text-left max-w">操作</th>
                </tr>
            </ng-template>
        </p-treeTable>
  </div>
  <div class="table-tbody">
    <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
        <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-i="index">
            <tr class="treegrid-2 treegrid-collapsed">
                <td class="bs-checkbox w5 text-center">
                    <input type="checkbox" #event (click)="_chose(event.checked,rowData.themeWordsId,files.length)"
                        [checked]="isChose">
                </td>
                <td class="w5 text-left max-w">{{rowData.themeWordsId}}</td>
                <td class="w15 text-left max-w" title="{{ rowData.name }}">
                    <p-treeTableToggler [rowNode]="rowNode" (onNodeExpand)="onNodeExpand($event)"></p-treeTableToggler>
                    {{rowData.name}}
                </td>
                <td class="w5 text-left max-w">{{rowData.labelName}}</td>
                <td class="w10 text-left max-w">{{rowData.themeCode}}</td>
                <td class="w5 text-left max-w">
                    <span class="stateGreen" *ngIf="rowData.status === 0">启用</span>
                    <span class="stateRed" *ngIf="rowData.status === -1">禁用</span>
                </td>
                <td class="w5 text-left max-w">
                    <span class="stateYellow" *ngIf="rowData.checkStatus === 0">未审</span>
                    <span class="stateGreen" *ngIf="rowData.checkStatus === 1">已审核</span>
                    <span class="stateRed" *ngIf="rowData.checkStatus === -1">不通过</span>
                </td>
                <td class="w10 text-left max-w">{{rowData.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                <td class="w20 text-left max-w">
                    <span *ngIf="right['keywordTrial']['addChild']" title="新增主题词" class="btn-i" data-toggle="modal" data-target="#add" (click)="add._details(rowData);initService._init(1)">
                        <img src="assets/new/add.png" width="14px" height="14px">
                    </span>
                    <span *ngIf="right['keywordTrial']['update']" title="编辑" class="btn-i" data-toggle="modal" data-target="#edit" (click)="edit._details(rowData);initService._init(1)">
                        <img src="assets/new/update.png" width="14px" height="14px">
                    </span>
                    <span *ngIf="right['keywordTrial']['details']" title="详情" class="btn-i" data-toggle="modal" data-target="#detail" (click)="detail._details(rowData);initService._init(1)">
                        <img src="assets/new/look.png" width="18px" height="18px">
                    </span>
                    <span title="审核" class="btn-i" data-toggle="modal" data-target="#keywordCheckStatus1" *ngIf="rowData.checkStatus === 0 && right['keywordTrial']['Review']" (click)="changeCheckStatus(rowData.themeWordsId,1)">
                            <img src="assets/new/examine.png" width="14px" height="14px">
                    </span>
                    <span title="取消审核" class="btn-i-auto" data-toggle="modal" data-target="#keywordCheckStatus1" *ngIf="rowData.checkStatus === 1 && right['keywordTrial']['cancelReview']" (click)="changeCheckStatus(rowData.themeWordsId,0)">
                            取消审核
                    </span>
                    <span title="同义词管理" class="btn-i-auto" *ngIf="right['keywordTrial']['synonymGl']" data-toggle="modal" data-target="#synonymManagementDetals" (click)="synonym._details(rowData);initService._init(1)">
                        同义词管理
                    </span>
                </td>
            </tr>
        </ng-template>
    </p-treeTable>
  </div>

</div>

<!--新增弹窗 开始-->
<app-trial-add #add [themeTagListVal]="themeTagListVal" (onSubmit)="_keyworkTabList()"></app-trial-add>
<!--新增弹窗 结束-->

<!-- 修改 BEGIN -->
<app-trial-edit #edit [themeTagListVal]="themeTagListVal" (onSubmit)="_keyworkTabList()"></app-trial-edit>
<!-- 修改 BEGIN -->

<!-- 引用详情 BEGIN -->
<app-trial-detail #detail [themeTagListVal]="themeTagListVal"></app-trial-detail>
<!-- 引用详情 BEGIN -->

<!-- 同义词管理 BEGIN -->
<app-trial-synonym #synonym (onSubmit)="_keyworkTabList()"></app-trial-synonym>
<!-- 同义词管理 BEGIN -->

<!-- 审核提示 -->
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static"
    aria-labelledby="myModalLabel" aria-hidden="true" id="keywordCheckStatus1">
    <div class="modal-dialog delete-modal modal-dialog-centered">
        <div class="modal-content" *ngIf="changeCheck === 0">
            <div class="modal-header">
                <h4 class="modal-title text-center">审核提示</h4>
            </div>
            <div class="modal-body text-center">
                <p class="delete-prompt">请确认是否取消审核！</p>
            </div>
            <div class="modal-footer" style="width: 100%;">
                <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="_review(0)">确认</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
        <div class="modal-content" *ngIf="changeCheck === 1">
            <div class="modal-header">
                <h4 class="modal-title text-center">审核提示</h4>
            </div>
            <div class="modal-body text-center">
                <p class="delete-prompt">请确认是否通过审核！</p>
            </div>
            <div class="modal-footer" style="width: 100%;">
                <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="_review(1)">通过</button>
                <!-- 点击不通过设置状态 (click)="_review(-1)" -->
                <button type="button" class="btn btn-default" data-dismiss="modal">不通过</button>
            </div>
        </div>
    </div>
</div>
<!-- 审核提示 -->